package com.qdrtme.landemo.api;

import android.content.Context;

import com.qdrtme.landemo.BaseApi;

import org.json.JSONException;

import java.util.HashMap;


/**
 * @Created by taylor on 12/8/17.
 * @class description 获取短信验证码
 */

public class GetSmsCodeApi extends BaseApi {

    private String mobileStr;   // 手机号
    private String tenantid;    // 租户id
    private String type;        // 认证类型
    private String siteId;      // 站点id

    //1：注册
    //2：找回密码
    //3：重置手机号码
    //4：验证手机号
    //5: 手机号登录

    public GetSmsCodeApi(Context c) {
        super(c);
    }

    @Override
    protected void getParams(HashMap<String, Object> params) {
        super.getParams(params);
        params.put("mobile", mobileStr);
        params.put("tenantid", tenantid);
        params.put("type", type);
    }

    @Override
    protected String getURL() {
        return GET_SMS_CODE;
    }

    @Override
    protected boolean analysisOutput(String result) throws JSONException {

        return true;
    }

    public void setMobileStr(String mobileStr) {
        this.mobileStr = mobileStr;
    }

    public void setTenantid(String tenantid) {
        this.tenantid = tenantid;
    }

    public void setSiteId(String siteId) {
        this.siteId = siteId;
    }

    public void setType(String type) {
        this.type = type;
    }
}
